//
//  CircileListTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/1.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "CircileListTableViewCell.h"
#import "CircleBottomCommentView.h"

@interface CircileListTableViewCell()
{
    GLGWImageView *headImageView;
    GLGWLabel *titleLab;
    GLGWLabel *timeLab;
    GLGWLabel *detailLab;
    CircleBottomCommentView *commontBottomView;
}

@end

@implementation CircileListTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setSepartionLineWith:lineModel_Half];
        headImageView = [[GLGWImageView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(15), kWidthProportion_In_iPhoneTriploid(44), kHeightProportion_In_iPhoneTriploid(44)) inSuperView:self];
        headImageView.backgroundColor = kRandomColor;
        
        titleLab = [[GLGWLabel alloc] initWithFrame:CGRectMake(kX_With_View(headImageView, 11), kHeightProportion_In_iPhoneTriploid(28), kWidthProportion_In_iPhoneTriploid(100), kHeightProportion_In_iPhoneTriploid(20)) theFont:BOLDSYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self];
        titleLab.text = @"陈烨";
        
        CGFloat width = 100;
        timeLab = [[GLGWLabel alloc] initWithFrame:CGRectMake(KScreenWidth - 100 - kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(29), width, kHeightProportion_In_iPhoneTriploid(20)) theFont:BOLDSYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self];
        timeLab.text = @"2018-09-25 10:10";
        
        CGFloat detailLeft = CGRectGetMinX(headImageView.frame);
        detailLab = [[GLGWLabel alloc] initWithFrame:CGRectMake(detailLeft, kY_With_View(headImageView, 10), KScreenWidth - detailLeft - kWidthProportion_In_iPhoneTriploid(48), kHeightProportion_In_iPhoneTriploid(40)) theFont:BOLDSYSTEMFONT(13) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:self];
        detailLab.numberOfLines = 2;
        detailLab.text = @"混沌创业营新一期开始招生，想上得可以来找我推荐。 在这里交到很多良师益友，是幸福也是一辈子得财富。学习学习才知道";
        
        commontBottomView = [[CircleBottomCommentView alloc] initWithFrame:CGRectMake(detailLeft, kY_With_View(detailLab, 0), KScreenWidth - 2 * detailLeft, kHeightProportion_In_iPhoneTriploid(48)) inSuperView:self];
        commontBottomView.Block_LikeAction = ^(GLGWLabel * _Nullable a_lab) {
            
        };
    }
    return self;
}

- (void)clickLikeAction:(GLGWLabel * _Nullable)a_lab
{
    if (self.Block_LikeClickAction) {
        self.Block_LikeClickAction(a_lab);
    }
}

@end
